/*
 * 0767. 翻转数组
 * 原地翻转给出的数组 nums
 * https://www.lintcode.com/problem/reverse-array/description
 * 
 * 样例
 * 给出 nums = [1,2,5]
 * 返回 [5,2,1]
 * 
 * 2018.06.25 @jeyming
 * 
 */
package reverse_array_0767;

public class Reverse_array_0767 {
    /**
     * @param nums: a integer array
     * @return: nothing
     */
    public void reverseArray(int[] nums) {
        // write your code here
    	for(int i = 0; i < (nums.length/2) ; ++i) {
    		int tmp = nums[i];
    		nums[i] = nums[nums.length - i - 1];
    		nums[nums.length - i - 1] = tmp;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}

}
